<template>
  <div class="LanMuContent">
    <div class="name"></div>
    <div class="button"></div>
    <div class="tip"></div>
    <div class="Content">
      <el-table :data="tableData.list" style="width: 100%">
        <el-table-column type="selection" width="55" />
        <el-table-column prop="title" label="栏目名称" width="180" />
        <el-table-column prop="id" label="栏目顺序" width="180" />
        <el-table-column prop="content" label="栏目描述" width="180" />
        <el-table-column prop="do" label="操作">
          <template #default="scope">
            <el-button link type="primary" size="small" @click.prevent="editRow(scope.row)">编辑</el-button>
            <el-button link type="primary" size="small" @click.prevent="deleteRow(scope.row)">删除</el-button>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script setup>
import { lanmu_list } from "@/axios/apis.js";

import { onMounted, reactive } from "vue";
import { RouterLink, RouterView } from "vue-router";

//定义响应式数据
var tableData = reactive({ list: [] });

onMounted(() => {
  lanmu_list("/api/lanmu/list").then(res => {
    console.log(res.data.list);
    tableData.list = res.data.list;
  });
});
</script>

<style>

</style>